<template>
<div class="article-wrap">
    <van-nav-bar
      title="夜晚安心"
      left-text="返回"
      left-arrow
      @click-left="navBack"
    />
    <div class="product product-2">
        <div class="avatar">
            <img src="https://img.yzcdn.cn/vant/cat.jpeg">
        </div>
        <div class="info">
            <p class="title">标题标题标题</p>
            <div class="clearfix">
                <div class="l" style="color: #666">2019-6-20
                    <van-icon style="vertical-align:middle" name="browsing-history-o" size="16" />4人
                    <van-icon style="vertical-align:middle" name="thumb-circle-o" size="16" />233人</div>
                <div class="r">查看全部
                    <van-icon name="arrow" style="vertical-align:middle" />
                </div>
            </div>
        </div>
    </div>
</div>
</template>

<script>
export default {
    name: 'Article',
    data() {
        return {
            navText: [
                '全部',
                '情感',
                '励志',
                '职场',
                '生活'
            ]
        }
    },
    methods: {
      navBack(){
        this.$router.go(-1)
      }
    }
}
</script>

<style lang="less" scoped>
.article-wrap {

    .product {
        padding: 5px 14px;
        background: white;
        margin: 5px 0;

        .header-title {
            h3 {
                margin: .25rem 0;
            }
        }

        .header-time {
            color: #999;
            padding: 0 0 5px;
        }

        .avatar {
            width: 100%;
            margin-bottom: 5px;

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    .product-2 {
        margin-top: 5px;
        background-color: white;
        padding: 5px 10px;
        display: grid;
        grid-template-columns: 95px 1fr;

        .avatar {
            width: 85px;
            height: 85px;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .info {
            display: grid;
            grid-template-rows: 1fr 22px;

            .title {
                font-size: 16px;
            }

            p {
                margin: 0;
            }
        }
    }
}
</style>
